// src/store/index.js
import { createStore } from 'vuex'
import app from './modules/app'
import user from './modules/user'
import getters from './getters'
import tagsView from "./modules/tagsView";

export default createStore({
    state: {
        count: 0
    },
    mutations: {
        increment(state) {
            state.count++
        },
        decrement(state) {
            state.count--
        }
    },
    actions: {
        incrementAsync({ commit }) {
            setTimeout(() => {
                commit('increment')
            }, 1000)
        }
    },
    getters,
    modules: {
        app,
        user,
        tagsView,
    },
})